package com.example.wordtris;


import java.util.Locale;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.content.res.Configuration;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
public class highscoreActivity extends Activity {
	Button breturn2;
	String linguaDefault;
	private Locale locale = null;
	private WordtrisDatabaseHelper WordtrisDatabaseHelper;
	SQLiteDatabase db;
	
		@Override
		 public void onCreate(Bundle savedInstanceState) {
		        super.onCreate(savedInstanceState);
		        WordtrisDatabaseHelper = new WordtrisDatabaseHelper(this);
		        db = WordtrisDatabaseHelper.getReadableDatabase();
		        Cursor cursor =db.query("lingua", null, null, null, null, null, null);
		        cursor.moveToFirst();
        			linguaDefault=cursor.getString(1);
        			cursor.close();
        	        db.close();
        			Configuration config = getBaseContext().getResources().getConfiguration();
        	        locale = new Locale(linguaDefault);
        	        Locale.setDefault(locale);
        	        config.locale = locale;
        	        getBaseContext().getResources().updateConfiguration(config, 
        	        	    getBaseContext().getResources().getDisplayMetrics());	
		        setContentView(R.layout.highscore_activity);
		        
		 		
		    }
		
}